/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package br.com.titanium.model.entity;

import java.io.Serializable;

/**
 * This a main entity for all domain titanium classes.
 *
 * @author Daniel Barcellos
 */
public class TitaniumEntity implements Serializable {

    private static final long serialVersionUID = 1;

    protected Long id;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    @Override
    public boolean equals(Object obj) {
        if (obj == null) {
            return false;
        }
        if (getClass() != obj.getClass()) {
            return false;
        }
        final TitaniumEntity other = (TitaniumEntity) obj;
        if (this.id != other.id && (this.id == null || !this.id.equals(other.id))) {
            return false;
        }
        return true;
    }

    @Override
    public int hashCode() {
        int hash = 3;
        hash = 59 * hash + (this.id != null ? this.id.hashCode() : 0);
        return hash;
    }

}
